<template>
  <a-layout id="components-layout-demo-top" class="layout">
    <com-header></com-header>
    <a-layout-content class="container">
      <com-banner style="margin: 20px 0; padding: 20px;background: #FFF" :list="content.banner"/>
      <a-divider><a-icon type="select" />筛选</a-divider>
      <com-classify-card :category="category_type"/>
      <card-content v-for="(cover, index) in content.lists"
                    :key="index"
                    :content="cover"
                    :title="cover.title">
        <com-title :title="cover.title"
                   slot="header"/>
      </card-content>
    </a-layout-content>
    <com-footer></com-footer>

  </a-layout>
</template>

<script>
export default {

  key(route) {
    return route.fullPath
  },

  head() {
    return {
      title: this.$route.query.name || '电视剧',
      meta: [
        {
          hid: 'description',
          name: 'description',
          content: 'My custom description'
        }
      ]
    }
  },
  async asyncData({ route, redirect, $axios}) {
    const category_type = await $axios.get('parse360/category_type?category=serial')
    const res = await $axios.get('/parse360/get_types_data', {
      params: {
        type: 'serial',
      }
    })
    return {
      content: (res.content || {}),
      category_type: (category_type.data || {}),
      page_type: 'serial',
    }
  },

  data() {
    return {


    }
  },

  mounted() {
    console.log(this)
  },

  methods: {}
}
</script>

<style scoped>

</style>
